Sub testBinaryTree()
    
    Dim btTree As BinaryTree
    
    Dim str1() As String * 1
    
    Dim i As Integer
    
    Dim j As Integer
    
    Dim iLen As Integer
    
    Dim str2 As String
    
    str2 = "ABDHIEJ#CFG"
    
    iLen = Len(str2)
    
    Set btTree = New BinaryTree
    
    ReDim str1(1 To iLen) As String * 1
    
    For i = 1 To iLen
        
        str1(i) = Mid$(str2, i, 1)
        
    Next i
    
    btTree.initBinaryTree
    
    Set btTree.HeadNode = btTree.CreateBinaryTree(str1, 1, UBound(str1) - LBound(str1) + 1)
    
    Call btTree.PreOrder(btTree.HeadNode)
    
End Sub